{template "header.html"}

<div class="row table-search-tool">
    <form action="{SELF}" method="get">
        {$search}
        <div class="col-xs-12">
            <label>
                {$select}
            </label>
            <label>
                <select name="field" class="form-control">
                    {loop $field $t}
                    {if $t.ismain}
                    <option value="{$t.fieldname}" {if $param.field==$t.fieldname}selected{/if}>{$t.name}</option>
                    {/if}
                    {/loop}
                </select>
            </label>
            <label><i class="fa fa-caret-right"></i></label>
            <label><input type="text" class="form-control" placeholder="" value="{$param['keyword']}" name="keyword" /></label>

            <label><button type="submit" class="btn green btn-sm onloading" name="submit" > <i class="fa fa-search"></i> {dr_lang('搜索')}</button></label>
        </div>
    </form>
</div>


<form class="form-horizontal" role="form" id="myform">
    {dr_form_hidden()}
    <input type="hidden" name="isajax" value="1">
    <div class="table-scrollable">
        <table class="table table-striped table-bordered table-hover table-checkable dataTable">
            <thead>
            <tr class="heading">
                <th class="myselect"></th>
                <th>{dr_lang('商品')}</th>
                <th width="100">{dr_lang('库存')}</th>
                <th width="200">{dr_lang('价格')}</th>
            </tr>
            </thead>
            <tbody>
            {loop $list $t}
            <tr class="odd gradeX">
                <td class="myselect">
                    <label class="mt-radio mt-radio-outline" style="margin-left: 5px;">
                        <input type="radio" class="" name="id" value="{$t.id}" />
                        <span></span>
                    </label>
                </td>
                <td><a href="{$t.url}" target="_blank">{$t.title}</a></td>
                <td>{$t.price_quantity}</td>
                <td><span class="price">￥{if $t.price_sku}{dr_sku_price($t.price_sku, 2, ' ~ ')}{else}{number_format($t.price, 2)}{/if}</span>元</td>
            </tr>
            {/loop}
            </tbody>
        </table>
    </div>

</form>

{template "footer.html"}